{include file="pub_header.htm"}

<div class="out_table">
<table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
  <tr>
    <td align="left" nowrap>&nbsp;
      <a href="{$lang.s._public.global.weburl}" target="_self" class="current_place">{$lang.s._public.global.website}</a>
      &raquo; <a href="{$control_index}?act=index" target="_self" class="current_place">论坛首页</a>
      &raquo; <a href="{$control_index}?act=cp" target="_self" class="current_place">会员中心</a>
    </td>
    <td align="right" nowrap>&nbsp;</td>
  </tr>
</table>
</div>

<div class="out_table"><div class="space"></div></div>
<div class="out_table">
<table width="98%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
  <tr align="left" class="block_header">
    <td colspan="2">我的好友</td>
  </tr>
  <tr>
    <td align="center" valign="top" width="20%" class="block_left">
      {include file="pub_cp_menu.htm"}
    </td>
    <td align="center" valign="top" width="80%" class="block_right">
    <table width="98%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
      <tr>
        <td height="20" align="left" class="current_place" nowrap>
          <a href="{$control_index}?act=cp" target="_self" class="current_place">会员中心</a>
          &raquo; <a href="{$control_index}?act=cp_friend" target="_self" class="current_place">我的好友</a>
        </td>
        <td align="right" nowrap>
          <img src="{$dir_images}/icon_warning.gif" title="Warning" alt="Warning" align="absmiddle" /> 双击修改内容
        </td>
      </tr>
    </table>
    <div class="space"></div>
    <table width="98%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
      <tr class="block_title">
        <td colspan="5" align="left">我的好友</td>
      </tr>
      <tr class="block_subtitle">
        <td width="20%" nowrap>用户名</td>
        <td width="50%" nowrap>备注</td>
        <td width="10%" nowrap>排序</td>
        <td width="10%" nowrap>加入时间</td>
        <td width="10%" nowrap>操作</td>
      </tr>
      {foreach name=friend from=$friend item=item}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
        <td height="25">
          {$item.m_username}
        </td>
        <td title="双击修改内容" ondblclick="xajax_set_value_onfocus('remark', '{$item.fid}', $('#remark_{$item.fid}_value').val(), 'textarea', '255', 'width:350px;height:30px;text-align:left;overflow-x:hidden;overflow-y:visible;');">
          <table width="100%" cellspacing="0" cellpadding="0" border="0" class="content_wrap"><tr><td align="left"><div id="remark_{$item.fid}" name="remark_{$item.fid}">{$item.remark|str_entag:'space,br'}</div></td></tr></table>
          <input type="hidden" id="remark_{$item.fid}_value" name="remark_{$item.fid}_value" value="{$item.remark|str_entag}">
        </td>
        <td title="双击修改内容" ondblclick="xajax_set_value_onfocus('rank', '{$item.fid}', $('#rank_{$item.fid}_value').val(), 'text', 11, 'width:60px;text-align:center;');">
          <table width="100%" cellspacing="0" cellpadding="0" border="0" class="content_wrap"><tr><td align="center"><div id="rank_{$item.fid}" name="rank_{$item.fid}">{$item.rank}</div></td></tr></table>
          <input type="hidden" id="rank_{$item.fid}_value" name="rank_{$item.fid}_value" value="{$item.rank}">
        </td>
        <td>{$item.time_created|date_format:"%Y-%m-%d<br />%H:%M:%S"}</td>
        <td>
          <a href="{$control_index}?act=cp_pm_send&ope=send&mid={$item.fid}" target="_self"><img src="{$dir_images}/icon_pm.gif" border="0" title="发站内短信给此好友"></a>
          <a href="{$control_index}?act=cp_friend&ope=del&mid={$item.fid}" target="_self"><img src="{$dir_images}/icon_delete.gif" border="0" title="删除此好友"></a>
        </td>
      </tr>
      {/foreach}
    </table>
    <div class="space"></div>
    <form action="{$control_index}?act=cp_friend&ope=add_username" method="post" name="cp_friend" id="cp_friend" enctype="multipart/form-data">
    <table width="98%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
      <tr class="block_footer" align="center">
        <td width="20%" height="20" align="center">
          <input id="username" name="username" size="6" maxlength="160" class="input" style="width:120px;text-align:center;" />
        </td>
        <td width="50%" align="left">
          <textarea id="add_remark" name="add_remark" rows="1" cols="6" class="textarea" style="width:350px;height:30px;text-align:left;overflow-x:hidden;overflow-y:visible;"></textarea>
        </td>
        <td width="10%" align="center">
          <input id="add_rank" name="add_rank" size="6" maxlength="11" class="input" style="width:60px;text-align:center;" />
        </td>
        <td width="20%" align="center" colspan="2">
          <input type="submit" value="添加好友" name="cp_friend_add_username" id="cp_friend_add_username" title="添加好友" class="submit">
        </td>
      </tr>
    </table>
    </form>
    <table width="98%" cellpadding="3" cellspacing="0" border="0" align="center">
      <tr>
        <td align="right">
        {if $pagination.page_total > 1}
          <span class="pagination_post_list">
            <span class="pagelink_side" title="Total record{$pagination.record_total}">{$pagination.record_total}</span>
            <span class="pagelink_side" title="Current page{$pagination.page_current}/Page{$pagination.page_total}"><span class="pagelink_current_rate">{$pagination.page_current}</span>/{$pagination.page_total}</span>
            {if $pagination.page_listbegin != ""}<span class="pagelink_side" title="Go to first page"><a href="{$pagination.url|print_format:$pagination.page_listbegin}" target="_self">&laquo;</a></span>{/if}
            {if $pagination.page_listbegin_more != ""}<span class="pagelink_side" title="Jump {$pagination.page_listnum/2|@floor} page"><a href="{$pagination.url|print_format:$pagination.page_listbegin_more}" target="_self">...</a></span>{/if}
            {if $pagination.page_previous != ""}<span class="pagelink_side" title="Previous page"><a href="{$pagination.url|print_format:$pagination.page_previous}" target="_self">&#8249;</a></span>{/if}
            {foreach name=page_list from=$pagination.page_list item=page_list}
              {if $page_list.if_current == "1"}
                <span class="pagelink_current" title="Current page{$page_list.page}">{$page_list.page}</span>
              {else}
                <span class="pagelink" title="{$page_list.page}"><a href="{$pagination.url|print_format:$page_list.page}" target="_self">{$page_list.page}</a></span>
              {/if}
            {/foreach}
            {if $pagination.page_next != ""}<span class="pagelink_side" title="Next page"><a href="{$pagination.url|print_format:$pagination.page_next}" target="_self">&#8250;</a></span>{/if}
            {if $pagination.page_listend_more != ""}<span class="pagelink_side" title="Jump {$pagination.page_listnum/2|@floor} page"><a href="{$pagination.url|print_format:$pagination.page_listend_more}" target="_self">...</a></span>{/if}
            {if $pagination.page_listend != ""}<span class="pagelink_side" title="Go to last page"><a href="{$pagination.url|print_format:$pagination.page_listend}" target="_self">&raquo;</a></span>{/if}
            <select onchange="self.location.href=this.options[this.selectedIndex].value" class="select">
            {if $pagination.page_selectbegin != ""}<option value="{$pagination.url|print_format:$pagination.page_selectbegin}">{$pagination.page_selectbegin}</option>{/if}
            {if $pagination.page_selectbegin_more != ""}<option value="{$pagination.url|print_format:$pagination.page_selectbegin_more}">...</option>{/if}
            {foreach name=page_select from=$pagination.page_select item=page_select}
              {if $page_select.if_current == "1"}
                <option value="{$pagination.url|print_format:$page_select.page}" selected="selected">{$page_select.page}</option>
              {else}
                <option value="{$pagination.url|print_format:$page_select.page}">{$page_select.page}</option>
              {/if}
            {/foreach}
            {if $pagination.page_selectend_more != ""}<option value="{$pagination.url|print_format:$pagination.page_selectend_more}">...</option>{/if}
            {if $pagination.page_selectend != ""}<option value="{$pagination.url|print_format:$pagination.page_selectend}">{$pagination.page_selectend}</option>{/if}
            </select>
          </span>
        {/if}
        </td>
      </tr>
    </table>
    </td>
  </tr>
</table>
</div>

{include file="pub_footer.htm"}